package ai.people.netmon.telegram.mapper;

import ai.people.netmon.framework.domain.telegram.entity.Channels;
import ai.people.netmon.framework.domain.telegram.vo.channels.ChannelsView;
import ai.people.netmon.framework.model.response.PageResponse;
import ai.people.netmon.telegram.domain.request.channels.ChannelsRequest;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 隐网监测系统-群组mapper
 *
 * @author yuanqinglong
 * @date 2022/1/10 10:09
 */
@Mapper
public interface ChannelsMapper {


    /**
     * 搜索群组
     *
     * @param offset         偏移量
     * @param limit          限制
     * @param searchKeywords 搜索关键字
     * @param fields         字段
     * @return {@link List}<{@link ChannelsView}>
     */
    List<Channels> searchChannelList(int offset, int limit, String searchKeywords, List<String> fields);


    /**
     * 搜索群组数
     *
     * @param searchKeywords 搜索关键字
     * @param fields         字段
     * @return long
     */
    long searchChannelCount(String searchKeywords, List<String> fields);

    /**
     * 分页查询群组
     *
     * @param channelsRequest 查询条件
     * @return {@link PageResponse}<{@link Channels}>
     */
    List<ChannelsView> businessChannelsList(ChannelsRequest channelsRequest);

    /**
     * 业务通道数
     *
     * @param channelsRequest 通道请求
     * @return long
     */
    long businessChannelsCount(ChannelsRequest channelsRequest);



}
